import request from 'utils/request';

export interface IOrder {
  id: string;
  created_at: string;
  updated_at: string;
  order_id: string;
  // 其他字段...
}

interface IResult {
  list: IOrder[];
}

interface IParams {
  order_id?: string;
  status?: string;
  sender_name?: string;
  sort_field?: string;
  asc?: boolean;
  page_size?: number;
  page_num?: number;
}

export const getOrderList = async (params: IParams) => {
  const result = await request.post<IResult>('/api/v1/order/list', params);
  return result;
};
